package com.example.tests;

import com.example.framework.Folders;
import org.testng.annotations.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

public class FolderRemovingTest extends TestManager{

    @Test
    public void shouldRemoveFolder(){
        String folder = "newFolder";
        manager.getFolderHelper().createFolder(folder);
        Folders oldFolders = manager.getFolderHelper().getFolders();
        manager.getFolderHelper().removeFolderByIndex(1);
        Folders newFolders = manager.getFolderHelper().getFolders();
        assertThat(newFolders, equalTo(oldFolders.without(folder)));
    }
}
